//
//  ClassifyCell.m
//  livingDesign
//
//  Created by dlios on 15-1-29.
//  Copyright (c) 2015年 怡居. All rights reserved.
//

#import "ClassifyCell.h"

@implementation ClassifyCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        //自定义imageView
        self.imageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_imageView];
        [_imageView release];
        
        //自定义label
        self.myLabel = [[UILabel alloc] init];
        self.myLabel.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:_myLabel];
        [_myLabel release];
        
        
    }
    return self;
}

//定义大小
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    self.imageView.frame = CGRectMake(self.frame.size.width / 8, self.frame.size.height / 8, self.frame.size.width * 3 / 4, self.frame.size.height * 5 / 8);
    
    self.myLabel.frame = CGRectMake(self.frame.size.width / 7, self.frame.size.height * 7 / 9, self.frame.size.width * 3 / 4, self.frame.size.height / 4);
    
    
}


- (void)dealloc
{
    [_myLabel release];
    [_imageView release];
    [super dealloc];
}


@end
